/**
 * @description: 汉诺塔问题
 **/
public class HanoiTower {
    public static void main(String[] args) {
        move(3, 'A', 'B', 'C');
    }
    public static void move(int n,char a,char b,char c){
        if(n==1){
            System.out.println(n+":"+a+"->"+c);
        }else {
            move(n - 1, a, c, b);//a到b
            System.out.println(n + ":" + a + "->" + c);
            move(n - 1, b, a, c);
        }
    }
}
